3.1291 \(\int \frac{(a+b \tan ^{-1}(c x)) (d+e \log (1+c^2 x^2))}{x} \, dx\)

Optimal. Leaf size=282 \[ -\frac{1}{2} a e \text{PolyLog}\left (2,-c^2 x^2\right )-\frac{1}{2} i b e \left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right ) \text{PolyLog}(2,-i c x)+\frac{1}{2} i b e \left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right ) \text{PolyLog}(2,i c x)+\frac{1}{2} i b d \text{PolyLog}(2,-i c x)-\frac{1}{2} i b d \text{PolyLog}(2,i c x)-i b e \text{PolyLog}(3,1-i c x)+i b e \text{PolyLog}(3,1+i c x)+i b e \log (1-i c x) \text{PolyLog}(2,1-i c x)-i b e \log (1+i c x) \text{PolyLog}(2,1+i c x)+a d \log (x)+\frac{1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac{1}{2} i b e \log (-i c x) \log ^2(1+i c x) \]

[Out]

a*d*Log[x] + (I/2)*b*e*Log[I*c*x]*Log[1 - I*c*x]^2 - (I/2)*b*e*Log[(-I)*c*x]*Log[1 + I*c*x]^2 + (I/2)*b*d*Poly
Log[2, (-I)*c*x] - (I/2)*b*e*(Log[1 - I*c*x] + Log[1 + I*c*x] - Log[1 + c^2*x^2])*PolyLog[2, (-I)*c*x] - (I/2)
*b*d*PolyLog[2, I*c*x] + (I/2)*b*e*(Log[1 - I*c*x] + Log[1 + I*c*x] - Log[1 + c^2*x^2])*PolyLog[2, I*c*x] - (a
*e*PolyLog[2, -(c^2*x^2)])/2 + I*b*e*Log[1 - I*c*x]*PolyLog[2, 1 - I*c*x] - I*b*e*Log[1 + I*c*x]*PolyLog[2, 1
+ I*c*x] - I*b*e*PolyLog[3, 1 - I*c*x] + I*b*e*PolyLog[3, 1 + I*c*x]

________________________________________________________________________________________

Rubi [A]  time = 0.341867, antiderivative size = 282, normalized size of antiderivative = 1., number of steps used = 18, number of rules used = 9, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.346, Rules used = {5015, 4848, 2391, 5013, 5011, 2396, 2433, 2374, 6589} \[ -\frac{1}{2} a e \text{PolyLog}\left (2,-c^2 x^2\right )-\frac{1}{2} i b e \left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right ) \text{PolyLog}(2,-i c x)+\frac{1}{2} i b e \left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right ) \text{PolyLog}(2,i c x)+\frac{1}{2} i b d \text{PolyLog}(2,-i c x)-\frac{1}{2} i b d \text{PolyLog}(2,i c x)-i b e \text{PolyLog}(3,1-i c x)+i b e \text{PolyLog}(3,1+i c x)+i b e \log (1-i c x) \text{PolyLog}(2,1-i c x)-i b e \log (1+i c x) \text{PolyLog}(2,1+i c x)+a d \log (x)+\frac{1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac{1}{2} i b e \log (-i c x) \log ^2(1+i c x) \]

Antiderivative was successfully verified.

[In]

Int[((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x,x]

[Out]

a*d*Log[x] + (I/2)*b*e*Log[I*c*x]*Log[1 - I*c*x]^2 - (I/2)*b*e*Log[(-I)*c*x]*Log[1 + I*c*x]^2 + (I/2)*b*d*Poly
Log[2, (-I)*c*x] - (I/2)*b*e*(Log[1 - I*c*x] + Log[1 + I*c*x] - Log[1 + c^2*x^2])*PolyLog[2, (-I)*c*x] - (I/2)
*b*d*PolyLog[2, I*c*x] + (I/2)*b*e*(Log[1 - I*c*x] + Log[1 + I*c*x] - Log[1 + c^2*x^2])*PolyLog[2, I*c*x] - (a
*e*PolyLog[2, -(c^2*x^2)])/2 + I*b*e*Log[1 - I*c*x]*PolyLog[2, 1 - I*c*x] - I*b*e*Log[1 + I*c*x]*PolyLog[2, 1
+ I*c*x] - I*b*e*PolyLog[3, 1 - I*c*x] + I*b*e*PolyLog[3, 1 + I*c*x]

Rule 5015

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*(Log[(f_.) + (g_.)*(x_)^2]*(e_.) + (d_)))/(x_), x_Symbol] :> Dist[d, I
nt[(a + b*ArcTan[c*x])/x, x], x] + Dist[e, Int[(Log[f + g*x^2]*(a + b*ArcTan[c*x]))/x, x], x] /; FreeQ[{a, b,
c, d, e, f, g}, x]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 5013

Int[(Log[(f_.) + (g_.)*(x_)^2]*(ArcTan[(c_.)*(x_)]*(b_.) + (a_)))/(x_), x_Symbol] :> Dist[a, Int[Log[f + g*x^2
]/x, x], x] + Dist[b, Int[(Log[f + g*x^2]*ArcTan[c*x])/x, x], x] /; FreeQ[{a, b, c, f, g}, x]

Rule 5011

Int[(ArcTan[(c_.)*(x_)]*Log[(f_.) + (g_.)*(x_)^2])/(x_), x_Symbol] :> Dist[Log[f + g*x^2] - Log[1 - I*c*x] - L
og[1 + I*c*x], Int[ArcTan[c*x]/x, x], x] + (Dist[I/2, Int[Log[1 - I*c*x]^2/x, x], x] - Dist[I/2, Int[Log[1 + I
*c*x]^2/x, x], x]) /; FreeQ[{c, f, g}, x] && EqQ[g, c^2*f]

Rule 2396

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*
(f + g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n])^p)/g, x] - Dist[(b*e*n*p)/g, Int[(Log[(e*(f + g*x))/(e*f -
d*g)]*(a + b*Log[c*(d + e*x)^n])^(p - 1))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*
f - d*g, 0] && IGtQ[p, 1]

Rule 2433

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.))*((k_.) + (l_.)*(x_))^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((k*x)/d)^r*(a + b*Log[c*x^n])^p*(f + g*Lo
g[h*((e*i - d*j)/e + (j*x)/e)^m]), x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, j, k, l, n, p, r},
 x] && EqQ[e*k - d*l, 0]

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin{align*} \int \frac{\left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx &=d \int \frac{a+b \tan ^{-1}(c x)}{x} \, dx+e \int \frac{\left (a+b \tan ^{-1}(c x)\right ) \log \left (1+c^2 x^2\right )}{x} \, dx\\ &=a d \log (x)+\frac{1}{2} (i b d) \int \frac{\log (1-i c x)}{x} \, dx-\frac{1}{2} (i b d) \int \frac{\log (1+i c x)}{x} \, dx+(a e) \int \frac{\log \left (1+c^2 x^2\right )}{x} \, dx+(b e) \int \frac{\tan ^{-1}(c x) \log \left (1+c^2 x^2\right )}{x} \, dx\\ &=a d \log (x)+\frac{1}{2} i b d \text{Li}_2(-i c x)-\frac{1}{2} i b d \text{Li}_2(i c x)-\frac{1}{2} a e \text{Li}_2\left (-c^2 x^2\right )+\frac{1}{2} (i b e) \int \frac{\log ^2(1-i c x)}{x} \, dx-\frac{1}{2} (i b e) \int \frac{\log ^2(1+i c x)}{x} \, dx+\left (b e \left (-\log (1-i c x)-\log (1+i c x)+\log \left (1+c^2 x^2\right )\right )\right ) \int \frac{\tan ^{-1}(c x)}{x} \, dx\\ &=a d \log (x)+\frac{1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac{1}{2} i b e \log (-i c x) \log ^2(1+i c x)+\frac{1}{2} i b d \text{Li}_2(-i c x)-\frac{1}{2} i b d \text{Li}_2(i c x)-\frac{1}{2} a e \text{Li}_2\left (-c^2 x^2\right )-(b c e) \int \frac{\log (i c x) \log (1-i c x)}{1-i c x} \, dx-(b c e) \int \frac{\log (-i c x) \log (1+i c x)}{1+i c x} \, dx+\frac{1}{2} \left (i b e \left (-\log (1-i c x)-\log (1+i c x)+\log \left (1+c^2 x^2\right )\right )\right ) \int \frac{\log (1-i c x)}{x} \, dx-\frac{1}{2} \left (i b e \left (-\log (1-i c x)-\log (1+i c x)+\log \left (1+c^2 x^2\right )\right )\right ) \int \frac{\log (1+i c x)}{x} \, dx\\ &=a d \log (x)+\frac{1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac{1}{2} i b e \log (-i c x) \log ^2(1+i c x)+\frac{1}{2} i b d \text{Li}_2(-i c x)-\frac{1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \text{Li}_2(-i c x)-\frac{1}{2} i b d \text{Li}_2(i c x)+\frac{1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \text{Li}_2(i c x)-\frac{1}{2} a e \text{Li}_2\left (-c^2 x^2\right )+(i b e) \operatorname{Subst}\left (\int \frac{\log (x) \log \left (-i c \left (\frac{i}{c}-\frac{i x}{c}\right )\right )}{x} \, dx,x,1+i c x\right )-(i b e) \operatorname{Subst}\left (\int \frac{\log (x) \log \left (i c \left (-\frac{i}{c}+\frac{i x}{c}\right )\right )}{x} \, dx,x,1-i c x\right )\\ &=a d \log (x)+\frac{1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac{1}{2} i b e \log (-i c x) \log ^2(1+i c x)+\frac{1}{2} i b d \text{Li}_2(-i c x)-\frac{1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \text{Li}_2(-i c x)-\frac{1}{2} i b d \text{Li}_2(i c x)+\frac{1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \text{Li}_2(i c x)-\frac{1}{2} a e \text{Li}_2\left (-c^2 x^2\right )+i b e \log (1-i c x) \text{Li}_2(1-i c x)-i b e \log (1+i c x) \text{Li}_2(1+i c x)-(i b e) \operatorname{Subst}\left (\int \frac{\text{Li}_2(x)}{x} \, dx,x,1-i c x\right )+(i b e) \operatorname{Subst}\left (\int \frac{\text{Li}_2(x)}{x} \, dx,x,1+i c x\right )\\ &=a d \log (x)+\frac{1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac{1}{2} i b e \log (-i c x) \log ^2(1+i c x)+\frac{1}{2} i b d \text{Li}_2(-i c x)-\frac{1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \text{Li}_2(-i c x)-\frac{1}{2} i b d \text{Li}_2(i c x)+\frac{1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \text{Li}_2(i c x)-\frac{1}{2} a e \text{Li}_2\left (-c^2 x^2\right )+i b e \log (1-i c x) \text{Li}_2(1-i c x)-i b e \log (1+i c x) \text{Li}_2(1+i c x)-i b e \text{Li}_3(1-i c x)+i b e \text{Li}_3(1+i c x)\\ \end{align*}

Mathematica [F]  time = 0.204386, size = 0, normalized size = 0. \[ \int \frac{\left (a+b \tan ^{-1}(c x)\right ) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x,x]

[Out]

Integrate[((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x, x]

________________________________________________________________________________________

Maple [C]  time = 2.036, size = 6931, normalized size = 24.6 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(c*x))*(d+e*ln(c^2*x^2+1))/x,x)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a d \log \left (x\right ) + \frac{1}{2} \, \int \frac{2 \,{\left (b d \arctan \left (c x\right ) +{\left (b e \arctan \left (c x\right ) + a e\right )} \log \left (c^{2} x^{2} + 1\right )\right )}}{x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x,x, algorithm="maxima")

[Out]

a*d*log(x) + 1/2*integrate(2*(b*d*arctan(c*x) + (b*e*arctan(c*x) + a*e)*log(c^2*x^2 + 1))/x, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b d \arctan \left (c x\right ) + a d +{\left (b e \arctan \left (c x\right ) + a e\right )} \log \left (c^{2} x^{2} + 1\right )}{x}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x,x, algorithm="fricas")

[Out]

integral((b*d*arctan(c*x) + a*d + (b*e*arctan(c*x) + a*e)*log(c^2*x^2 + 1))/x, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c*x))*(d+e*ln(c**2*x**2+1))/x,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \arctan \left (c x\right ) + a\right )}{\left (e \log \left (c^{2} x^{2} + 1\right ) + d\right )}}{x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x,x, algorithm="giac")

[Out]

integrate((b*arctan(c*x) + a)*(e*log(c^2*x^2 + 1) + d)/x, x)